.game-board-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  font-family: sans-serif;
}

.played-area {
  border: 1px dashed #aaa;
  padding: 15px;
  margin-bottom: 20px;
  width: 80%;
  min-height: 100px; /* Ensure area is visible even when empty */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.domino-chain {
  display: flex;
  flex-wrap: wrap; /* Allow dominoes to wrap if needed */
  justify-content: center;
  align-items: center;
  min-height: 85px; /* Approximate height of one domino */
}

.player-hand {
  border: 1px solid #007bff;
  padding: 15px;
  margin-top: 20px;
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.domino-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Add some spacing and cursor for clickable dominoes in hand */
.player-hand .domino-container {
  margin: 5px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.player-hand .domino-container:hover {
  transform: scale(1.05);
}

/* Style for playable dominoes in hand */
.player-hand .domino-container.playable {
  border: 2px solid #28a745; /* Green border */
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.6); /* Subtle green glow */
}

h3 {
  margin-top: 0;
  color: #333;
}

p {
  color: #666;
}

.game-actions {
  margin-top: 20px;
}

.game-actions button {
  padding: 10px 15px;
  font-size: 1em;
  cursor: pointer;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.game-actions button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.game-actions button:hover:not(:disabled) {
  background-color: #218838;
}

.game-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  width: 80%;
}

.game-message {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

/* Style for winning message */
.game-message:contains("赢了") {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}